home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000140_klaus@ux7.tfl.dk_Wed Dec 22 20:53:20 1993.msg < prev    next >
Internet Message Format  |  1994-10-11  |  4KB

  1. Received: from ux7.tdr.dk (ux7.tfl.dk) by cs.umb.edu with SMTP id AA17512
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Wed, 22 Dec 1993 13:53:25 -0500
  3. Received: by ux7.tdr.dk (/\==/\ Smail3.1.24.1 #24.1)
  4.     id <m0pCYgT-0001bzC@ux7.tdr.dk>; Wed, 22 Dec 93 19:53 MET
  5. Message-Id: <m0pCYgT-0001bzC@ux7.tdr.dk>
  6. From: klaus@tdr.dk (Klaus Elmquist Nielsen)
  7. Subject: Re: Security and MakeTeXPK
  8. To: tex-k@cs.umb.edu
  9. Date: Wed, 22 Dec 1993 19:53:20 +0100 (MET)
  10. In-Reply-To: <199312220115.UAA28900@phobos.sscl.uwo.ca> from "John Tucker" at Dec 21, 93 08:15:37 pm
  11. X-Mailer: ELM [version 2.4 PL21]
  12. Content-Type: text
  13. Content-Length: 3385      
  14.  
  15. > When installing TeX, I ran across the problem of MakeTeXPK not being able
  16. > to access the directory when I ran it as anything except root.
  17.  
  18. Some (many?) sites install their software packages as another user
  19. than root. This is more secure in the following sense: The
  20. installations scripts is never run as root and this limits the damage
  21. they can do to the rest of the system. It is also possible to install
  22. each software package under a different user, which ensures that the
  23. installation scripts cannot change other software packages.
  24.  
  25. > My possible solution is this:
  26. >    Create a group called tex and chown the entire TeX hierarchy to root.tex
  27. >    Having done this, I set all read-only files to 644 and all executable
  28. >    files to 755 (directories and binaries).
  29.  
  30. MakeTeXPK only needs write access to the directories containing the PK
  31. files. There is no point in giving it write access to all your TeX
  32. files.
  33.  
  34. > My question is this: If I set
  35. > MakeTeXPK to setgid when running (2755), do I introduce a huge
  36. > gaping security hole?
  37.  
  38. I know that setuid shell scripts are very insecure. Guess it is the
  39. same with setgid shell scripts.
  40.  
  41. Some remarks about the security of MakeTeXPK:
  42.  
  43. (1) Any user can create any number of fonts no matter how secure
  44.     MakeTeXPK is made. This is because MakeTeXPK is an ordinary command
  45.     that any user can activate. Maybe quotas can help here (to limit the
  46.     number of fonts etc), but exactly how many fonts does a user need?
  47.     Thus there are limits to how secure the idea of MakeTeXPK can be
  48.     without giving each user its own area for PK files.
  49.  
  50. (2) MakeTeXPK needs write access to the directories which contains the
  51.     PK files. It may be possible to write a C version which is setuid, and
  52.     thus get rid of the global write access to the PK directories.  This
  53.     program must call METAFONT without setuid, of cause.  But (1) above
  54.     still applies.
  55.  
  56. (3) What is the worst thing that can happen given global write access
  57.     to the directories containing PK files? I can think of two things:
  58.  
  59.     (a) PK files can be added/deleted/altered. This is unplesant but not fatal.
  60.  
  61.     (b) As far as I remember: To use a setuid shell script for a
  62.         breakin, a writeable directory on the same file system as is all that
  63.         is needed...
  64.         If this is true (I don't have the recipe), there may be serious
  65.         security problems.
  66.  
  67. If you are concerned about having all your PK files in a world
  68. writeable directory, then consider having two sets of PK
  69. directories. One which is world writeable: generated fonts goes
  70. here. And another one which isn't: generated fonts may be copied from
  71. the world writeable directory (or regenerated from the list of PK
  72. files in the world writeable directory). All the TeX drivers have both
  73. of the directories in their search path. The world writeable directory
  74. goes last in the search path.  This setup ensures that already
  75. generated files that are in the non-writeable directory cannot be
  76. changed `any user'.
  77.  
  78. Hope this helps.
  79.  
  80. Cheers,
  81.  
  82.     Klaus
  83. -- 
  84. Klaus Elmquist Nielsen                                  | Big blues:
  85. Tele Danmark Research                                   | Q: Am I uniX?
  86. Email: klaus@tdr.dk                                     | A: No!
  87. ``Mass production means chemestry, not cookery'', The Chocolate Book (Penguin)
  88.            ``Hvis Fakta er fakta, s{\aa} er Brugsen fup!''